<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/5/28 0028
 * Time: 11:22
 */

namespace app\admin\validate;


use think\Validate;

class Currency extends Validate
{
    protected $rule = [
        'data'      =>'',
        'title'     =>'require',
        'pid'       =>'require|integer',
        'show'      => 'require|in:1,2',
        'cu_id'     => 'require',
        'platform'  => 'require'
    ];

    protected $message = [
        'title.require'     =>  '请输入交易对名称',
        'pid.require'       =>  '请选择平台',
        'pid.integer'       =>  '请选择争取的平台',
        'show.require'      =>  '请选择是否显示',
        'show.in'           =>  '请选择正确的选项',
        'cu_id.require'     =>  '请选择平台或币种',
        'platform.require'  =>  '请选择平台',
        'platform.notIn'    =>  '请选择正确的平台'
    ];

    protected $scene = [
        'currencylist'  =>  ['data'],
        'currencyset'   =>  ['title','pid'],
        'currencydetail'=>  ['cu_id'],
        'currencydel'   =>  ['cu_id'],
        'wapsixdata'    =>  ['data'],
        'getcurrency'   =>  ['data'],
        'wapsixset'     =>  ['title'],
        'wapsixdel'     =>  ['data'],
        'currencyheyuelist'  =>['data'],
        'currencytest'  =>  ['platform','title']
    ];
}